cmake_minimum_required(VERSION 3.2)

add_library(struct struct_util.c)
# add_library(${PROJECT_NAME}::struct ALIAS ${PROJECT_NAME})


if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")# using GCC
    add_compile_options(-Wall -Werror  -fno-strict-aliasing)
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")    # using Visual Studio C++
    # add_compile_options("/source-charset:utf-8")
    add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
    add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
endif()

target_include_directories(struct
    PUBLIC .)
